import axios from 'axios'



const request = axios.create({
    baseURL: 'http://localhost:8080/', // url = base url + request url
    timeout: 5000 // request timeout
})
//请求拦截器
request.interceptors.request.use(config => {
   config.headers['Content-Type'] = 'application/json;charset=utf-8';
   
   return config
  }, error => Promise.reject(error));


//响应拦截器
request.interceptors.response.use(config => {
    return config
   }, error => Promise.reject(error));


export default request








